Integrand size = 25, antiderivative size = 255 \[ \int (c+d x)^3 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=-\frac {6 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {24 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {4 (c+d x)^3 \cos (a+b x)}{b}+\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {18 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {18 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {18 i d^3 \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {18 i d^3 \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {24 d^3 \sin (a+b x)}{b^4}-\frac {12 d (c+d x)^2 \sin (a+b x)}{b^2} \]
[Out]
Time = 0.41 (sec) , antiderivative size = 255, normalized size of antiderivative = 1.00, number of steps used = 20, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {4516, 4493, 3377, 2717, 4268, 2611, 6744, 2320, 6724} \[ \int (c+d x)^3 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=-\frac {6 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {18 i d^3 \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {18 i d^3 \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {24 d^3 \sin (a+b x)}{b^4}-\frac {18 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {18 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {24 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {12 d (c+d x)^2 \sin (a+b x)}{b^2}+\frac {4 (c+d x)^3 \cos (a+b x)}{b} \]
[In]
[Out]
Rule 2320
Rule 2611
Rule 2717
Rule 3377
Rule 4268
Rule 4493
Rule 4516
Rule 6724
Rule 6744
Rubi steps \begin{align*} \text {integral}& = \int \left (3 (c+d x)^3 \cos (a+b x) \cot (a+b x)-(c+d x)^3 \sin (a+b x)\right ) \, dx \\ & = 3 \int (c+d x)^3 \cos (a+b x) \cot (a+b x) \, dx-\int (c+d x)^3 \sin (a+b x) \, dx \\ & = \frac {(c+d x)^3 \cos (a+b x)}{b}+3 \int (c+d x)^3 \csc (a+b x) \, dx-3 \int (c+d x)^3 \sin (a+b x) \, dx-\frac {(3 d) \int (c+d x)^2 \cos (a+b x) \, dx}{b} \\ & = -\frac {6 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {4 (c+d x)^3 \cos (a+b x)}{b}-\frac {3 d (c+d x)^2 \sin (a+b x)}{b^2}-\frac {(9 d) \int (c+d x)^2 \cos (a+b x) \, dx}{b}-\frac {(9 d) \int (c+d x)^2 \log \left (1-e^{i (a+b x)}\right ) \, dx}{b}+\frac {(9 d) \int (c+d x)^2 \log \left (1+e^{i (a+b x)}\right ) \, dx}{b}+\frac {\left (6 d^2\right ) \int (c+d x) \sin (a+b x) \, dx}{b^2} \\ & = -\frac {6 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {6 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {4 (c+d x)^3 \cos (a+b x)}{b}+\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {12 d (c+d x)^2 \sin (a+b x)}{b^2}-\frac {\left (18 i d^2\right ) \int (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (18 i d^2\right ) \int (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (18 d^2\right ) \int (c+d x) \sin (a+b x) \, dx}{b^2}+\frac {\left (6 d^3\right ) \int \cos (a+b x) \, dx}{b^3} \\ & = -\frac {6 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {24 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {4 (c+d x)^3 \cos (a+b x)}{b}+\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {18 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {18 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}+\frac {6 d^3 \sin (a+b x)}{b^4}-\frac {12 d (c+d x)^2 \sin (a+b x)}{b^2}+\frac {\left (18 d^3\right ) \int \cos (a+b x) \, dx}{b^3}+\frac {\left (18 d^3\right ) \int \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right ) \, dx}{b^3}-\frac {\left (18 d^3\right ) \int \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right ) \, dx}{b^3} \\ & = -\frac {6 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {24 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {4 (c+d x)^3 \cos (a+b x)}{b}+\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {18 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {18 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}+\frac {24 d^3 \sin (a+b x)}{b^4}-\frac {12 d (c+d x)^2 \sin (a+b x)}{b^2}-\frac {\left (18 i d^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^4}+\frac {\left (18 i d^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^4} \\ & = -\frac {6 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {24 d^2 (c+d x) \cos (a+b x)}{b^3}+\frac {4 (c+d x)^3 \cos (a+b x)}{b}+\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {9 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {18 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {18 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {18 i d^3 \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {18 i d^3 \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4}+\frac {24 d^3 \sin (a+b x)}{b^4}-\frac {12 d (c+d x)^2 \sin (a+b x)}{b^2} \\ \end{align*}
Time = 0.82 (sec) , antiderivative size = 459, normalized size of antiderivative = 1.80 \[ \int (c+d x)^3 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\frac {3 \left (-2 b^3 (c+d x)^3 \text {arctanh}(\cos (a+b x)+i \sin (a+b x))+3 i d \left (b^2 (c+d x)^2 \operatorname {PolyLog}(2,-\cos (a+b x)-i \sin (a+b x))+2 i b d (c+d x) \operatorname {PolyLog}(3,-\cos (a+b x)-i \sin (a+b x))-2 d^2 \operatorname {PolyLog}(4,-\cos (a+b x)-i \sin (a+b x))\right )-3 i d \left (b^2 (c+d x)^2 \operatorname {PolyLog}(2,\cos (a+b x)+i \sin (a+b x))+2 i b d (c+d x) \operatorname {PolyLog}(3,\cos (a+b x)+i \sin (a+b x))-2 d^2 \operatorname {PolyLog}(4,\cos (a+b x)+i \sin (a+b x))\right )\right )}{b^4}+\frac {4 \cos (b x) \left (b^3 c^3 \cos (a)-6 b c d^2 \cos (a)+3 b^3 c^2 d x \cos (a)-6 b d^3 x \cos (a)+3 b^3 c d^2 x^2 \cos (a)+b^3 d^3 x^3 \cos (a)-3 b^2 c^2 d \sin (a)+6 d^3 \sin (a)-6 b^2 c d^2 x \sin (a)-3 b^2 d^3 x^2 \sin (a)\right )}{b^4}-\frac {4 \left (3 b^2 c^2 d \cos (a)-6 d^3 \cos (a)+6 b^2 c d^2 x \cos (a)+3 b^2 d^3 x^2 \cos (a)+b^3 c^3 \sin (a)-6 b c d^2 \sin (a)+3 b^3 c^2 d x \sin (a)-6 b d^3 x \sin (a)+3 b^3 c d^2 x^2 \sin (a)+b^3 d^3 x^3 \sin (a)\right ) \sin (b x)}{b^4} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 848 vs. \(2 (237 ) = 474\).
Time = 2.97 (sec) , antiderivative size = 849, normalized size of antiderivative = 3.33
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 929 vs. \(2 (231) = 462\).
Time = 0.32 (sec) , antiderivative size = 929, normalized size of antiderivative = 3.64 \[ \int (c+d x)^3 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int (c+d x)^3 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\text {Timed out} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 606 vs. \(2 (231) = 462\).
Time = 0.42 (sec) , antiderivative size = 606, normalized size of antiderivative = 2.38 \[ \int (c+d x)^3 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\frac {c^{3} {\left (8 \, \cos \left (b x + a\right ) - 3 \, \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) + 3 \, \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right )\right )}}{2 \, b} - \frac {36 i \, d^{3} {\rm Li}_{4}(-e^{\left (i \, b x + i \, a\right )}) - 36 i \, d^{3} {\rm Li}_{4}(e^{\left (i \, b x + i \, a\right )}) - 6 \, {\left (-i \, b^{3} d^{3} x^{3} - 3 i \, b^{3} c d^{2} x^{2} - 3 i \, b^{3} c^{2} d x\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - 6 \, {\left (-i \, b^{3} d^{3} x^{3} - 3 i \, b^{3} c d^{2} x^{2} - 3 i \, b^{3} c^{2} d x\right )} \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) - 8 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} - 6 \, b c d^{2} + 3 \, {\left (b^{3} c^{2} d - 2 \, b d^{3}\right )} x\right )} \cos \left (b x + a\right ) - 18 \, {\left (i \, b^{2} d^{3} x^{2} + 2 i \, b^{2} c d^{2} x + i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) - 18 \, {\left (-i \, b^{2} d^{3} x^{2} - 2 i \, b^{2} c d^{2} x - i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + 3 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - 3 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) + 36 \, {\left (b d^{3} x + b c d^{2}\right )} {\rm Li}_{3}(-e^{\left (i \, b x + i \, a\right )}) - 36 \, {\left (b d^{3} x + b c d^{2}\right )} {\rm Li}_{3}(e^{\left (i \, b x + i \, a\right )}) + 24 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + b^{2} c^{2} d - 2 \, d^{3}\right )} \sin \left (b x + a\right )}{2 \, b^{4}} \]
[In]
[Out]
\[ \int (c+d x)^3 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\int { {\left (d x + c\right )}^{3} \csc \left (b x + a\right )^{2} \sin \left (3 \, b x + 3 \, a\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x)^3 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx=\text {Hanged} \]
[In]
[Out]